<?php
  if(!isset($_GET['user_id']))
  {
	header('Location:index.php?module=user_manager');
  }
  else
  {
	$showPage = false;
	if($authority->getAuthority('delete_user',$_SESSION['id']) == true)
	{
		$showPage = true;
		if($db->sql(" DELETE FROM snm_users WHERE id=".intval($_GET['user_id'])))
		{
			$hata['sonuc'] = true;
			$hata['aciklama'] = ' User Deleted.';
		}
		else
		{
			$hata['sonuc'] = false;
			$hata['aciklama'] = ' ERROR! - SQL Query Error.';
		}
	}
	else
	{
		$hata['sonuc'] = false;
		$hata['aciklama'] = ' <strong>Error!</strong> you cant login this page!.';
	}
  }
  
  include "template/delete_user.php";
?>
